﻿ <?php 
require_once 'Conf.php';
require_once 'send.php';
Conf::import( include 'commonconf.php' );

//echo  Conf::get( 'txtMouldForTarget' );
$fileName=Conf::get( 'txtMouldForTarget' );
$content=file_get_contents("$fileName");
$target="夏志滨";
$table_change = array('target'=>"$target");
$content=strtr($content,$table_change);
//$content=iconv('ansi','utf-8',$content);
Sender::sendMail('604267811@qq.com','生日快乐',$content,'华南理工大学团委学生会','null');
Sender::sendQQMsg('604267811','收到？');
//$file=iconv("UTF-8","gbk",$content);

/*
    $file = @fopen('f:\winplan\test.txt', 'a+');   
	$fileName='f:\winplan\test.txt';
    if (false === $file || !is_writable($fileName))    
    {    
        exit("Failed to do that you told me!");    
    }        
$conn=mysql_connect("localhost","root","");   
 mysql_select_db("enter_usum");     
 $sql = "SELECT * FROM `student` LIMIT 0, 30 ";  
 $result=mysql_query($sql);	
 while($rs=mysql_fetch_object($result)){
	fwrite($file,$rs->StuPost.'  ');
 }
     
   fclose($file);  
   mysql_close();
   
   
   
			 $file = @fopen('f:\winplan\test.txt', 'a+');   
	$fileName='f:\winplan\test.txt';
    if (false === $file || !is_writable($fileName))    
    {    
        exit("Failed to do that you told me!");    
    }        

	fwrite($file,$data);

     
   fclose($file);  
   
   */
?>    

